<template>
  <ul class="iii" @click="www">
      <li v-for="item in cityList" :id="item.id" style="list-style-type: none; text-align: justify" :key="item.id">
        城市： {{item.name}}---
        拼音： {{item.pinyin}}
      </li>
  </ul>
</template>

<script type="text/javascript">
export default {
  name: 'city',
  data () {
    return {
      cityList: []
    }
  },
  mounted () {
    this.www()
  },
  methods: {
    www: function () {
      var self = this
      this.$http.get('static/city.json').then(function (res) {
        console.log(res)
        for (var i = 0, len = res.body.Lists.length; i < len; i++) {
          var selData = res.body.Lists[i]
          self.cityList.push(selData)
        }
      })
    }
  }
}
</script>

<style scoped>

</style>
